<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
    <title>用户中心-PlayGirl</title>
    <link rel="stylesheet" th:href="@{/bootstrap/css/bootstrap.min.css}">
    <style>
        #table-title tr th {
            border: none;
        }
    </style>
</head>
<body style="background: #f2f2f2;">

<div th:replace="~{common/header::header(activeUrl='user')}"></div>

<main class="container" role="main">

    <div class="row">

        <div th:replace="~{user/index::userShowPanel}"></div>

        <div class="col-md-9 blog-main">

            <div class="my-3 p-3 bg-white rounded shadow-sm">

                <form class="needs-validation" method="post"
                      novalidate="" th:action="@{'/userinfo/update/'+${session.loginUser.getUid()}}">
                    <div class="row">
                        <div class="col-md-6 mb-3">
                            <label for="nickname">用户昵称</label>
                            <input class="form-control" id="nickname" name="nickname" placeholder="PlayGirl"
                                   required="" th:value="${userInfo.getNickname()}" type="text">
                        </div>
                        <div class="col-md-6 mb-3">
                            <label for="realname">真实姓名</label>
                            <input class="form-control" id="realname" name="realname" placeholder="xxxx"
                                   required="" th:value="${userInfo.getRealname()}" type="text">
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-6 mb-3">
                            <label for="qq">QQ</label>
                            <input class="form-control" id="qq" name="qq" placeholder="PlayGirl" required=""
                                   th:value="${userInfo.getQq()}" type="text">
                        </div>
                        <div class="col-md-6 mb-3">
                            <label for="wechat">WeChat</label>
                            <input class="form-control" id="wechat" name="wechat" placeholder="xxxx"
                                   required="" th:value="${userInfo.getWechat()}" type="text">
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-6 mb-3">
                            <label for="email">邮箱</label>
                            <input class="form-control" id="email" name="email" placeholder="123456789@qq.com"
                                   th:value="${userInfo.getEmail()}" type="email">
                        </div>

                        <div class="col-md-6 mb-3">
                            <label for="phone">手机</label>
                            <input class="form-control" id="phone" name="phone" placeholder="123 3333 2222"
                                   th:value="${userInfo.getPhone()}" type="text">
                        </div>
                    </div>

                    <div class="mb-3">
                        <label for="work">工作</label>
                        <input class="form-control" id="work" name="work" placeholder="Java高级程序员" th:value="${userInfo.getWork()}"
                               type="text">
                    </div>

                    <div class="mb-3">
                        <label for="address">地址</label>
                        <input class="form-control" id="address" name="address" placeholder="中国 重庆"
                               th:value="${userInfo.getAddress()}" type="text">
                    </div>

                    <div class="mb-3">
                        <label for="hobby">爱好(使用英文逗号隔开)</label>
                        <input class="form-control" id="hobby" name="hobby" placeholder="代码,唱歌,游戏"
                               th:value="${userInfo.getHobby()}" type="text">
                    </div>

                    <div class="mb-3">
                        <label>自我介绍</label>
                        <textarea class="form-control" name="intro" th:text="${userInfo.getIntro()}"
                                  type="text"></textarea>
                    </div>

                    <hr class="mb-4">

                    <button class="btn btn-primary btn-lg btn-block" type="submit"> 更新资料</button>

                </form>

            </div>

        </div>

    </div>

</main>


<div th:replace="~{common/footer::footer}"></div>

<a class="to-top">返回顶部</a>
<script th:src="@{/js/jquery-3.5.1.min.js}"></script>
<script th:src="@{/bootstrap/js/bootstrap.bundle.min.js}"></script>
<script th:src="@{/js/toTop.js}"></script>

<!-- layer 赞赏码 -->
<script th:src="@{/layer/layer.js}"></script>
<script th:src="@{/js/axios.js}"></script>

<script>
    // 后台读取
    function donate() {
        axios.get('/user/donate/1').then(response => {
            console.log();
            layer.photos({
                photos: response.data,
                anim: 5 //0-6的选择，指定弹出图片动画类型，默认随机（请注意，3.0之前的版本用shift参数）
            });
        })
    }
</script>


</body>
</html>